import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
let routes = [
    {
        path: '/',
        redirect: '/login'
    },

    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: () => import('./views/Home'),
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            {path: '/echarts', component: ()=>import('./views/charts/echarts'), name: '首页'}
        ]
    }, {
        path: '/',
        component: () => import('./views/Home'),
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            {path: '/403', component: ()=>import('./views/auth/403'), name: '无权限', hidden: true},
            {path: '/dept', component: ()=>import('./views/org/Department'), name: '部门管理'},
            {path: '/emp', component: ()=>import('./views/org/Employee'), name: '员工管理'}
        ]
    },
    {
        path: '/',
        component: () => import('./views/Home'),
        name: '权限管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            {path: '/permission', component: ()=>import('./views/auth/Permission'), name: '权限管理'},
            {path: '/role', component: ()=>import('./views/auth/Role'), name: '角色管理'},
            {path: '/menu', component: ()=>import('./views/auth/Menu'), name: '菜单管理'},
        ]
    },
    {
        path: '/',
        component: () => import('./views/Home'),
        name: '线索管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            {path: '/clue', component: ()=>import('./views/clue/Clue'), name: '线索管理'}
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: () => import('./views/Home'),
        name: 'nav1',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            {path: '/main', component: Main, name: '主页', hidden: true},
            {path: '/table', component: Table, name: 'table'},
            {path: '/form', component: Form, name: 'form'},
            {path: '/user', component: user, name: 'user'},
        ]
    },
    {
        path: '/',
        component: () => import('./views/Home'),
        name: '导航二',
        iconCls: 'fa fa-id-card-o',
        children: [
            {path: '/page4', component: Page4, name: '页面4'},
            {path: '/page5', component: Page5, name: '页面5'}
        ]
    },
    {
        path: '/',
        component: () => import('./views/Home'),
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            {
                path: '/page6',
                component: Page6,
                name: '导航三'
            }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: {path: '/404'}
    }
];

export default routes;